package ru.urfc.portal.model.radio;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

import ru.urfc.portal.model.SpectrObject;
import ru.urfc.portal.ui.client.Constants;

@Table(name = "portal_frequencyassignments")
@Entity
@XmlRootElement(name = Constants.CHANNEL)
public class NetFrequencyAssignment extends SpectrObject {

	private NetWithLicense net;
	@Column(name = "f_pr")
	public Long in;
	@Column(name = "f_per")
	public Long out;
	@Column(name = "channo")
	public Integer channelNumber;
	
	public NetFrequencyAssignment() {
	}

	public NetFrequencyAssignment(NetWithLicense net, Long in, Long out, Integer channelNumber) {
		super();
		this.net = net;
		this.in = in;
		this.out = out;
		this.channelNumber = channelNumber;
	}
	
	@XmlTransient
	public NetWithLicense getNet() {
		return net;
	}
	
}
